﻿@model Nop.Web.Models.Catalog.ProductModel
@{
        //Html.AddScriptParts(@Url.Content("~/Scripts/slimbox2.js"));
}
<div class="picture">
    @if (Model.DefaultPictureZoomEnabled)
    {
        <a href="@Model.DefaultPictureModel.FullSizeImageUrl" rel="lightbox-pd" title="@Model.Name">
            <img id="imgMain" alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title" />
        </a>
    }
    else
    {
        <img id="imgMain" alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title" />
    }
    @*@if (Model.PictureModels.Count > 1)
    {
        <ul class="picturethumbs">
            
            @foreach (var picture in Model.PictureModels)
            {
                <li class="a-left">
                    <img style=" cursor:pointer;" src="@picture.ImageUrl" alt="@picture.AlternateText" title="@picture.Title" onclick ="javascript:UpdateMainImage('@picture.ImageUrlSize300')"/>
                </li>
            }
            
        </ul>
    }*@
</div>
<script language="javascript" type="text/javascript">
    function UpdateMainImage(urlSmall) {
        var imgMain = document.getElementById('imgMain');
        imgMain.src = urlSmall;

    }

</script>
